package week3;
import java.util.Scanner;
/**
 * Created by dell on 2017/3/10.
 */
public class CashApp2 {
    public static void main(String[] args){
        CashCard[] cards = {
                new CashCard("A001", 500, 0),
                new CashCard("A002", 300, 0),
                new CashCard("A003", 1000, 0)
        };

        Scanner scanner = new Scanner(System.in);
        for(CashCard card : cards) {
            System.out.printf("为 (%s, %d, %d) 储值：",card.number, card.balance, card.bonus);
            card.balance += scanner.nextInt();
            System.out.printf("明细 (%s, %d, %d)%n",card.number, card.balance, card.bonus);
        }
    }

}
